/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package py.com.mblj.domain;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author markos
 */
@Entity
@Table(name = "jerarquias")
@NamedQueries({@NamedQuery(name = "Jerarquias.findAll", query = "SELECT j FROM Jerarquias j"), @NamedQuery(name = "Jerarquias.findByJeId", query = "SELECT j FROM Jerarquias j WHERE j.jeId = :jeId"), @NamedQuery(name = "Jerarquias.findByJeDescripcion", query = "SELECT j FROM Jerarquias j WHERE j.jeDescripcion = :jeDescripcion")})
public class Jerarquias implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "je_id")
    private Integer jeId;
    @Column(name = "je_descripcion")
    private String jeDescripcion;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "reJerarquia", fetch = FetchType.LAZY)
    private List<Responsables> responsablesList;

    public Jerarquias() {
    }

    public Jerarquias(Integer jeId) {
        this.jeId = jeId;
    }

    public Integer getJeId() {
        return jeId;
    }

    public void setJeId(Integer jeId) {
        this.jeId = jeId;
    }

    public String getJeDescripcion() {
        return jeDescripcion;
    }

    public void setJeDescripcion(String jeDescripcion) {
        this.jeDescripcion = jeDescripcion;
    }

    public List<Responsables> getResponsablesList() {
        return responsablesList;
    }

    public void setResponsablesList(List<Responsables> responsablesList) {
        this.responsablesList = responsablesList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (jeId != null ? jeId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Jerarquias)) {
            return false;
        }
        Jerarquias other = (Jerarquias) object;
        if ((this.jeId == null && other.jeId != null) || (this.jeId != null && !this.jeId.equals(other.jeId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.com.mblj.domain.Jerarquias[jeId=" + jeId + "]";
    }

}
